package com.example.exceldemo.controller;

import com.example.exceldemo.service.WordService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.io.IOException;

/**
 * @Description
 * @Author xiaohuang
 * @Date 2024/7/10
 */
@RequestMapping("word")
@Api(tags = "word导出")
@RestController
public class WordController {
    @Resource
    private WordService wordService;


    @GetMapping("docxExportTemplate")
    @ApiOperation(value = "模板导出(easyPoi)", produces = "application/octet-stream")
    public void exportTemplate()  {
        wordService.exportTemplate();
    }

    @GetMapping("docxInit")
    @ApiOperation(value = "自定义导出(poi)", produces = "application/octet-stream")
    public void docxInit()  {
        wordService.docxInit();
    }

}
